/*
 * @Descripttion: 
 * @version: 
 * @Author: Glorill
 * @Date: 2021-10-28 15:21:44
 * @LastEditors: Glorill
 * @LastEditTime: 2021-11-22 16:44:40
 */

#ifndef SHOOT_H
#define SHOOT_H

/* Includes ------------------------------------------------------------------*/

#include "Serial_Plot.h"

#include "math.h"
#include "SRML.h"

/* Exported macros -----------------------------------------------------------*/

/* Exported types ------------------------------------------------------------*/

/* Exported variables --------------------------------------------------------*/

extern Serial_Plot ShootData;
extern Motor_C610 DriveplateMotor;
extern Motor_C620 FrictionMotor[];

class C_Shoot
{
    private:
        float MaxBulletSpeed;
        float ShootFrequency;
        bool Multi_Enable;
        bool Friction_State;

        void MultipleShootControl();
        void DriveplateMotorControl();
        void FrictionMotorControl();
        void Send_Motor_Message();
    public:
        enum E_ShootState
        {
            DISABLE = 0, //关闭输出
            NORMAL = 1,  //正常工作
        } state;
        
        void Init(void);
        void Control(void);

        void SetState(E_ShootState _state) { state = _state; };
        void SetFrictionState(bool _state) { Friction_State = _state; };
        void SingleShoot(void);
        void MultipleShoot(bool IS_Enable, float frequency);

        bool GetFrictionState(){return Friction_State; };

};

extern C_Shoot Shoot;

/* Exported function declarations --------------------------------------------*/

#endif

/************************ COPYRIGHT(C) USTC-ROBOWALKER **************************/
